package cn.iocoder.yudao.module.blog.controller.admin.poster.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 海报 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class PosterBaseVO {

    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "标题不能为空")
    private String title;

    @Schema(description = "图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
    @NotNull(message = "图片不能为空")
    private String picUrl;

    @Schema(description = "文案", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "文案不能为空")
    private String comment;

    @Schema(description = "推荐开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "推荐开始时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime recommendStartTime;

    @Schema(description = "推荐结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "推荐结束时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime recommendEndTime;

    @Schema(description = "类型id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3981")
    @NotNull(message = "类型id不能为空")
    private Long typeId;

}
